<template>
	<!-- 我的课程 -->
	<view @touchmove.stop.prevent="() => {}">
		<baseHead title="我的课程" :showReturn="true" :right="false" >
			<template slot="textnr">
				<view style="
            width: 100%;
            background-color: #ffffff;
            position: fixed;
            z-index: 999;
	
          ">
					<u-sticky bgColor="#fff">
						<u-tabs :list="list" :activeStyle="activeStyle" :lineColor="'#3476FE'" :scrollable="false" :current="current" @click="clickTab"></u-tabs>
					</u-sticky>
				</view>
			</template>
		</baseHead>


		<!-- <view class="box"> -->
		<scroll-view scroll-y class="scroll" :style="{'height':windowHeight-50-statusBarH+'px','margin-top':45+'px'}">
			<view class="contentbox">
				<view class="content" v-for="item in 10">
					<view class="imgbox">
						<image class="image" src="/static/zs/hrc-ios-app-ico.png"></image>
						<view class="imagetext">录播</view>
						<view class="zhezao">已下架</view>
					</view>
					<view class="con-right">
						<view class="title">政策解读《“十四五”信息化和工业化深度融合发展规划》</view>
						<view class="con-right-bot">
							<view class="text">已学42%</view>
							<view class="btn" v-if="state==0">继续学习</view>
							<view class="btn1" v-else>25人已学习</view>
						</view>
					</view>
				</view>
			</view>
		</scroll-view>


		<!-- </view> -->
	</view>
</template>

<script>
	import baseHead from "@/pages/component/baseHead.vue";
	export default {
		data() {
			return {
				list: [{
						name: '已收藏'
					},
					{
						name: '已学习'
					}
				],
				current: 1,
				URL: this.$config.domain.staticUrl,
				statusBarH: '',
				windowHeight: '',
				windowWidth: '',
				activeStyle:{
					color:'#3476FE',
				},
				state:0

			}
		},
		components: {
			baseHead,
		},
		onShow() {
			const app = getApp()
			this.statusBarH = app.globalData.customBarH //状态栏高度
			this.windowHeight = app.globalData.phoneInformation.windowHeight //屏幕高度
			this.windowWidth = app.globalData.phoneInformation.windowWidth
		},
		methods: {
			clickTab(e) {
				console.log(e);
			}
		}
	}
</script>

<style scoped lang="scss">
	.contentbox {
		padding: 20rpx;
		margin-bottom: 30px;

		.content {
			display: flex;
			justify-content: space-between;
			background-color: #fff;
			padding: 18rpx 20rpx;
			border-radius: 20rpx;
			margin-bottom: 18rpx;

			.imgbox {
				display: flex;
				justify-content: center;
				align-items: center;
				position: relative;

				.image {
					width: 230rpx;
					height: 174rpx;
					border-radius: 20rpx;
				}

				.imagetext {
					position: absolute;
					bottom: 0;
					right: 0;
					padding: 2rpx 14rpx;
					background: #3476FE;
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					opacity: 1;
					font-size: 20rpx;
					font-weight: 400;
					color: #FFFFFF;
				}

				.imagetext1 {
					position: absolute;
					bottom: 0;
					right: 0;
					padding: 2rpx 14rpx;
					background: #F35370;
					border-radius: 4rpx 4rpx 4rpx 4rpx;
					opacity: 1;
					font-size: 20rpx;
					font-weight: 400;
					color: #FFFFFF;
				}

				.zhezao {
					width: 230rpx;
					height: 174rpx;
					border-radius: 20rpx;
					background-color: rgba(0, 0, 0, 0.5);
					position: absolute;
					display: flex;
					justify-content: center;
					align-items: center;
					font-size: 20rpx;
					font-weight: 400;
					color: #FFFFFF;
				}
			}

			.con-right {
				display: flex;
				flex-direction: column;
				align-items: stretch;
				justify-content: space-around;
				padding-left: 20rpx;

				.title {
					font-size: 28rpx;
					font-weight: bold;
					color: #000000;
				}

				.con-right-bot {
					display: flex;
					justify-content: space-between;
					align-items: center;

					.text {
						font-size: 30rpx;
						font-weight: 400;
						color: #F35370;
					}

					.btn {
						background: #3476FE;
						border-radius: 8rpx;
						opacity: 1;
						font-size: 24rpx;
						font-weight: 400;
						color: #FFFFFF;
						padding: 10rpx 30rpx;
						display: flex;
						align-items: center;
						justify-content: center;
					}

					.btn1 {
						background: rgba(52, 118, 254, 0.1);
						border-radius: 8rpx;
						font-size: 24rpx;
						font-weight: 400;
						color: #3476FE;
						padding: 10rpx 30rpx;
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}
		}


	}
</style>